Visual Basic (Declaration) | |
---|---|
<ExtensionAttribute()> Public Overloads Shared Function ToQuery(Of T As {Class, IEntity})( _ ByVal entities As IEnumerable(Of T) _ ) As EntityQuery(Of T) |
Visual Basic (Usage) | ![]() |
---|---|
Dim entities As IEnumerable(Of T) Dim value As EntityQuery(Of T) value = EntityQueryExtensions.ToQuery(Of T)(entities) |
C# | |
---|---|
[ExtensionAttribute()] public static EntityQuery<T> ToQuery<T>( IEnumerable<T> entities ) where T: class, IEntity |
C++/CLI | |
---|---|
[ExtensionAttribute()] public: static EntityQuery<T^>^ ToQuerygeneric<typename T> ( IEnumerable<T^>^ entities ) where T: ref class, IEntity |
Parameters
- entities
Type Parameters
- T
Exception | Description |
---|---|
System.ArgumentOutOfRangeException | Thrown if the entity list passed is empty. |
C# | ![]() |
---|---|
var mgr = new DomainModelEntityManager(); var customers = mgr.Customers.Take(3).ToList(); var query = customers.ToQuery(); |
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family